<?php
/**
 * Copyright (c) 2006-2008, Julien PORTALIER
 * http://featherphp.googlecode.com/
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 */

/**
 * Displays a specific error (404, 403, 500, etc.)
 * 
 * @param $status Integer 404, 403, 400, etc.
 * @param $action String Renders a specific view.
 * @param $data Array Data to pass to view.
 */
class HTTPError extends Exception
{
	public $status;
	public $data;
	
	function __construct($code, $action=null, array $data=null)
	{
		$status = HTTP::get_status($code);
		parent::__construct($status, $code);
		$this->action = $action;
		$this->data   = $data;
	}
}

?>